#!/bin/bash

# 设置环境变量
export MACA_PATH=/opt/maca/
export LD_LIBRARY_PATH=${MACA_PATH}/lib:${MACA_PATH}/mxgpu_llvm/lib:${LD_LIBRARY_PATH}
export CUDA_PATH=/opt/maca/tools/cu-bridge/
export CUDA_HOME=/opt/maca/tools/cu-bridge/
export CUCC_PATH=/opt/maca/tools/cu-bridge/
export PATH=${CUCC_PATH}/tools:${CUCC_PATH}/bin:${PATH}

# Iterate all the cases in the folder and plot comparison figures
for src in *.cu 
do
    name=${src%.cu}
    echo "$name"
    KERNEL=$name make_maca output
done
make plot
